import http from "@/utils/http";
import request from "@/utils/request";
/*
 *  user
 * */

//机器人管理列表
export async function doRobotList(body) {
	return http.get("/application/base/list", body);
}

//删除机器人
export async function doRobotRemove(body) {
	return http.postFormData("/application/base/delete", body);
}

//新增机器人
export async function doRobotAdd(body) {
	return http.post("/application/base/add", body);
}

// 知识配置 知识库列表
export async function robotCategoryList(body) {
	return http.get("/rootCategory/listShare", body);
}


// 应用中心 渠道详情
export async function getImChannelInfo(params) {
	return http.get("/robot/getImChannelInfo", params);
}

// 应用中心 渠道详情 更新
export async function postSaveImChannelInfo(params) {
	return http.post("/robot/updateImChannelInfo", params);
}

// 应用中心-交互中心-详情
export async function getInteractCenterInfo(params) {
	return http.get('/application/base/getInteractCenterInfo', params)
}

// 应用中心-基础设置-详情
export async function fetchApplicationInfo(params) {
	return http.get("/application/base/getInfo", params);
}

//应用中心-基础设置-编辑（应用信息/渠道信息）
export async function doApplicationEdit(params) {
	return http.post("/application/base/edit", params);
}

//应用中心-进线设置-外观设置-详情
export async function fetchWebCommonInfo(params) {
	return http.get("/application/webCommon/getInfo", params);
}

//应用中心-进线设置-欢迎语-详情
export async function fetchWelcomeInfo(params) {
	return http.get("/application/welcome/getInfo", params);
}

//应用中心-进线设置-欢迎语-编辑
export async function doWelcomeEdit(params) {
	return http.post("/application/welcome/edit", params);
}

//应用中心-机器人设置-基础配置-详情
export async function fetchRobotBasicInfo(params) {
	return http.get("/robot/getInfo", params);
}

//应用中心-机器人设置-基础配置-编辑
export async function doRobotBasicEdit(params) {
	return http.post("/robot/editInfo", params);
}

//应用中心-机器人设置-策略配置-详情
export async function fetchRobotPolicyInfo(params) {
	return http.get("/robotAction/getInfo", params);
}

//应用中心-机器人设置-策略配置-编辑
export async function doRobotPolicyEdit(params) {
	return http.post("/robotAction/edit", params);
}

//应用中心-机器人设置-话术配置-详情
export async function fetchRobotScriptInfo(params) {
	return http.get("/robotSpeech/getInfo", params);
}

//应用中心-机器人设置-话术配置-编辑
export async function doRobotScriptEdit(params) {
	return http.post("/robotSpeech/edit", params);
}

//应用中心-终端管理列表
export async function channleRegulateList(params) {
	return http.get("/application/channleRegulate/list", params);
}

//应用中心-终端管理-下线
export async function channleRegulateRemove(params) {
	return http.get("/application/channleRegulate/remove", params);
}